﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace RestaurantBooker.Model
{
    public class FrameDescription : BasePropertyChangedObject
    {
        public RestaurantBooker.Model.Enums.FrameType FrameType { get; set; }
        public Type ControlType { get; set; }
        public Control ControlInstance { get; set; }

        public string DisplayText { get; set; }


        /// <summary>
        /// The <see cref="SelectedFrame" /> property's name.
        /// </summary>
        public const string SelectedFramePropertyName = "SelectedFrame";

        private FrameDescription _selectedFrame = null;

        /// <summary>
        /// Gets the SelectedFrame property.
        /// TODO Update documentation:
        /// Changes to that property's value raise the PropertyChanged event. 
        /// This property's value is broadcasted by the Messenger's default instance when it changes.
        /// </summary>
        public FrameDescription SelectedFrame
        {
            get
            {
                return _selectedFrame;
            }

            set
            {
                if (_selectedFrame == value)
                {
                    return;
                }

                _selectedFrame = value;

                // Update bindings, no broadcast
                RaisePropertyChanged(SelectedFramePropertyName);
            }
        }
    }
}
